/****** Object:  Stored Procedure dbo.spr_UpdateExDBClientCommByPK  ******/

 use [TourIS]
 GO

 if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[spr_UpdateExDBClientCommByPK]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
 drop procedure [dbo].[spr_UpdateExDBClientCommByPK]
 GO

 SET QUOTED_IDENTIFIER OFF
 GO
 SET ANSI_NULLS OFF
 GO

 CREATE  PROCEDURE [dbo].[spr_UpdateExDBClientCommByPK]
 (
	@clientid int,
	@compid int,
	@contactdate smalldatetime,
	@contactmode varchar(50),
	@details varchar(100),
	@orig_srno int,
	@srno int
 )

 AS

 BEGIN
	SET NOCOUNT ON
	DECLARE @Err int

	UPDATE [ClientComm]
	SET
		[ClientId] = @clientid,
		[CompId] = @compid,
		[ContactDate] = @contactdate,
		[ContactMode] = @contactmode,
		[Details] = @details,
		[SrNo] = @srno

	WHERE
	[SrNo] = @orig_srno


	SET @Err = @@Error
	RETURN @Err
 END

 SET QUOTED_IDENTIFIER OFF
 GO
 SET ANSI_NULLS ON
 GO

